package com.lxp.design.shop.order.controller;

import com.lxp.design.shop.order.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author LaiXiaoPeng
 * @version 1.0
 * @date 2021/10/9 11:25
 */
@RestController
@RequestMapping("/test")
public class TestController {
    @Autowired
    private OrderService orderService;
    @GetMapping("/do")
    public String doTest(){
        return "test success";
    }
    @GetMapping("/rpc")
    public String rpcTest(){
        return orderService.getPersons();
    }
    @GetMapping("/success")
    public String success(){
        return orderService.success();
    }

    @GetMapping("/timeOut")
    public String timeOut(){
        return orderService.timeOut();
    }
    @GetMapping("/breaker")
    public Long breaker(@RequestParam Integer divide){return orderService.breaker(divide);}
}

